package com.renren.yx.base.dao.daoutil;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.renren.yx.base.dao.GenericDao;

@SuppressWarnings("rawtypes")
public class InitDao {

	static ApplicationContext applicationContext;
	static GenericDao dao;
	static {
		applicationContext = new ClassPathXmlApplicationContext(
				"ApplicationContext.xml");
		dao = (GenericDao) applicationContext.getBean("GenericDao");
	}

	public static ApplicationContext getApplicationContext() {
		return applicationContext;
	}

	public static GenericDao getDao() {
		return dao;
	}

}
